package cheme.ProcessEditor.Parts.Streams;

import org.eclipse.draw2d.Figure;
import org.eclipse.draw2d.geometry.Dimension;
import org.eclipse.draw2d.geometry.Point;
import org.eclipse.draw2d.geometry.Rectangle;

import cheme.ProcessEditor.Figures.Util.TagLocator;
import cheme.ProcessEditor.Parts.Streams.Tag.PartTag;

public class MoveTagRequest extends org.eclipse.gef.requests.LocationRequest
{
	private PartTag source;
	
	private Point startLocation;
		
	private Dimension delta;
	private Rectangle feedbackBounds;
	
	public Rectangle getFeedbackBounds()
	{
		return feedbackBounds;
	}

	public void setFeedbackBounds(Rectangle feedbackBounds)
	{
		this.feedbackBounds = feedbackBounds;
	}

	public MoveTagRequest(PartTag source)
	{
		this.source = source;
	}
	
	Figure getFigure()
	{
		return getSource().getFigure();
	}
	
	TagLocator getLocator()
	{
		return getSource().getLocator();
	}
	
	/**
	 * Returns the GraphicalEditPart that this request applies to.
	 * @return the bendpoint's ConnectionEditPart
	 */
	public PartTag getSource() {
		return source;
	}

	/**
	 * Sets the GraphicalEditPart this request applies to.
	 * @param s the bendpoint's ConnectionEditPart
	 */
	public void setSource(PartTag s) {
		source = s;
	}

	public Dimension getDelta()
	{
		return delta;
	}

	public void setDelta(Dimension delta)
	{
		this.delta = delta;
	}

	public Point getStartLocation()
	{
		return startLocation;
	}

	public void setStartLocation(Point startLocation)
	{
		this.startLocation = startLocation;
	}
	@Override
	public Object getType()
	{
		return "MoveTagRequest";
	}
}
